<?php
/**
 * NRHC theme
 */

  echo $site->DOCTYPE();

?>
<?php snippet('ascii-art.php') ?>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <!-- Set the viewport width to device width for mobile -->
  <meta name="viewport" content="width=device-width" />

  <title><?php echo $page->title() ?> | <?php echo $site->title() ?></title>

  <meta name="description" content="<?= $page->description(); ?>">
  <meta name="author" content="<?= $page->author(); ?>">
  <meta name="copyright" content="<?= c::get('page.copyright') ?>">
  <meta name="keywords" content="<?= $page->keywords(); ?>">

  <link rel="shortcut icon" href="/<?= theme::$folder; ?>/images/favicon.ico">

  <link href="/<?= theme::$folder ?>/stylesheets/style.css?v=20140206" rel="stylesheet">
  <?php foreach( (array) $page->get( 'css' ) as $css ): ?>
  <link href="<?= $css['file']; ?>" rel="<?= $css['rel']; ?>">
  <?php endforeach; ?>
  <?php if( $page->styles ): ?>
  <style type="text/css">
  <?= $page->styles; ?>
  </style>
  <?php endif; ?>

	<script src="/<?= theme::$folder ?>/javascripts/foundation/modernizr.foundation.js"></script>

  <!--[if IE]>
    <link href="/<?= theme::$folder ?>/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
  <![endif]-->

	<!-- IE Fix for HTML5 Tags -->
	<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

</head>

<body class="<?= browser::getBodyClass(); ?> <?= browser::areWeHome(); ?>">

  <?php snippet('toolbox.php') ?>

  <header class="site-header">

    <h1 class="site-logo" itemscope itemtype="http://schema.org/Organization">
      <a href="<?php echo url() ?>" itempro="url" title="North Rock Hill Church">
        <span itemprop="name">North Rock Hill Church</span>
      </a>
    </h1><!-- /site-logo -->
    <section class="header-search">
      <?php snippet( 'searchform.php', array( 'autofocus'=>FALSE )) ?>
    </section><!-- /header-search -->
    <hr>

    <nav class="header-navigation">
      <?php module( 'liriope', 'menu', array('page'=>$page, 'menuclass'=>'nav-bar' )) ?>
    </nav><!-- /header-navigation -->

  </header><!-- /.site-header -->

  <div class="site-content" role="main">
    <div class="twelve columns">

<?= $liriope ?>

    </div>
  </div><!-- /.site-content -->

  <footer class="site-footer">
    <div class="row">
      <nav>
        <?php module( 'liriope', 'menu', array('page'=>$page, 'depth'=>1) ) ?>
      </nav>
      <div class="social">
        <a href="http://twitter.com/nrhc" target="_blank"><i class="foundicon-twitter"></i></a>
        <a href="http://www.facebook.com/northrockhillchurch" target="_blank"><i class="foundicon-facebook"></i></a>
        <a href="http://instagram.com/northrockhill" target="_blank"><i class="foundicon-instagram"></i></a>
        <a href="http://vimeo.com/nrhc" target="_blank"><i class="foundicon-vimeo"></i></a>
      </div>
    </div><!-- /.row -->
    <div class="row">
      <div class="legal">
        <a href="<?php echo url( 'about-us/staff' ) ?>" class="button">Meet the NRHC Staff &raquo;</a>
        <?php snippet( 'footer-businesscard.php' ) ?>
      </div>
      <div class="copyright" itemscope itemtype="http://schema.org/Organization">
        <p id="copyright">&copy;<?php echo date( 'Y', time()) ?> <span itemprop="name">North Rock Hill Church</span></p>
      </div>
    </div><!-- /.row -->
  </footer>

  <?php snippet('modals.php') ?>

  <?php if( $error ) echo $error; ?>

  <?php if(c::get('debug')) : ?>
  <script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.mediaQueryToggle.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.tabs.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.buttons.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.navigation.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.accordion.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.forms.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.reveal.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.placeholder.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.tooltips.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.orbit.js"></script>
	<script src="/<?= theme::$folder ?>/javascripts/foundation/jquery.foundation.alerts.js"></script>

  <script src="/<?= theme::$folder ?>/javascripts/foundation/app.js"></script>

  <script src='/<?= theme::$folder ?>/javascripts/waypoints.min.js'></script>
  <script src='/<?= theme::$folder ?>/javascripts/jquery.scrollTo.min.js'></script>
  <script src='/<?= theme::$folder ?>/javascripts/jquery.hoverIntent.min.js'></script>
  <script src='/<?= theme::$folder ?>/javascripts/scripts.js'></script>
  <br>

  <script defer src="/js/script.js"></script>
  <?php else: ?>
  <script src='/<?= theme::$folder ?>/javascripts/scripts.min.js'></script>
  <?php endif ?>

  <?php foreach( (array) $page->get( 'js' ) as $script): ?>
  <script src="<?= $script['file']; ?>" type="<?= $script['type']; ?>"></script>
  <?php endforeach; ?>
  <?php foreach( (array) $page->get( 'script' ) as $block): ?>
  <script type="text/javascript" charset="UTF-8">
    <?= $block; ?>
  </script>
  <?php endforeach; ?>
  <!-- end scripts-->

  <!-- Change UA-XXXXX-X to be your site's ID -->
  <script>
    window._gaq = [['_setAccount','UA-11629380-1'],['_trackPageview'],['_trackPageLoadTime']];
    Modernizr.load({
      load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
    });
  </script>

  <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
       chromium.org/developers/how-tos/chrome-frame-getting-started -->
  <!--[if lt IE 7 ]>
    <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
    <script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
  <![endif]-->
  
</body>
</html>

